<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <th:block th:replace="include/css"/>
    <link rel="stylesheet" type="text/css" href="/static/webuploader/webuploader.css">
    <link rel="stylesheet" type="text/css" href="/static/css/publicTopic.css">
    <title>发帖</title>
</head>
<body>
<th:block th:replace="include/header:: header"/>
<div class="main">
    <div class="container">
        <form id="postBbsForm">
            <input type="hidden" name="content" id="richContent"/>
            <div class="row">
                <div class="form-group" id="topicTitle">
                    <label class="col-xs-1 control-label"> <em class="important">*</em>
                        标题:
                    </label>
                    <div class="col-xs-10">
                        <input class="form-control" name="title" id="title"/>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="form-group" id="category">
                    <label class="col-xs-1 control-label"> <em class="important">*</em>
                        板块:
                    </label>
                    <div class="col-xs-3">
                        <select class="form-control" name="pCategoryId" id="pCategoryId">
                            <option value="">请选择一级分类</option>
                        </select>
                    </div>
                    <div class="col-xs-3">
                        <select class="form-control" name="categoryId" id="categoryId">
                            <option value="">请选择二级分类</option>
                        </select>
                    </div>
                    <input id="categoryName" name="categoryName" type="hidden"/>
                </div>
            </div>

            <div class="row">
                <div class="form-group">
                    <label class="col-xs-1 control-label">
                        <em class="important">*</em>
                        类型:
                    </label>
                    <div class="col-xs-8">
                        <label class="checkbox-inline" style="padding-left: 0;" th:each="item,l:${topicType}" th:if="${l.index==0}">
                            <input type="radio" name="topicType" th:checked="${l.index==0}" th:value="${item.getType()}" class="topicType"> <th:block th:text="${item.getDesc()}" />
                        </label>
                    </div>
                </div>
            </div>

            <div id="votePanel">
                <div class="row">
                    <div class="form-group">
                        <label class="col-xs-1 control-label"></label>
                        <div class="col-xs-8" id="voteChooseList">
                            <div class="row">
                                <div class="col-xs-9">
                                    <input name="voteContent" type="text" class="form-control answer"
                                           placeholder="输入选项内容">
                                </div>
                                <div class="col-xs-2" id="addVoteChoose"><a href="javascript:;">添加选项</a></div>
                            </div>
                            <div class="row">
                                <div class="col-xs-9">
                                    <input name="voteContent" type="text" class="form-control answer"
                                           placeholder="输入选项内容">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="form-group">
                        <label class="col-xs-1 control-label">投票类型:</label>
                        <div class="col-xs-4">
                            <label class="checkbox-inline" style="padding-left: 0;" th:each="item,l:${voteType}">
                                <input type="radio" th:checked="${l.index eq 0}" name="voteType" th:value="${item.getType()}"><th:block th:text="${item.getDesc()}" /></label>
                        </div>
                    </div>
                </div>
                <div class="row" id="enddate">
                    <div class="form-group">
                        <label class="col-xs-1 control-label">截止日期:</label>
                        <div class="col-xs-2">
                            <input id="endDateString" name="endDateString" class="form-control" type="text"
                                   onClick="WdatePicker()"/>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="form-group" id="ueContent">
                    <label class="col-xs-1 control-label"> <em class="important">*</em>
                        内容:
                    </label>
                    <div class="col-xs-10">
                        <script id="editor" type="text/plain" style="width:950px;height:300px;"></script>
                    </div>
                </div>
            </div>

            <input type="hidden" name="fileName" id="attached_file_name"/>
            <input type="hidden" name="fileUrl" id="attached_file"/>

            <!--<div class="row">
                <div class="form-group">
                    <label class="col-xs-1 control-label">&nbsp;&nbsp;&nbsp;
                        附件:
                    </label>
                    <div class="col-xs-1" id="filePicker">
                        <a class="btn btn-info">上传附件</a>
                    </div>
                    <div class="col-xs-4" id="fileuploadtip">
                        <span class="info">大小不能超过2M,只能是.rar、.zip文件</span>
                    </div>
                    <div id="loading-upload" class="col-xs-1" style="display:none">
                        <img src="/static/images/loading.gif">
                    </div>
                    <div class="col-xs-4" id="file-list">

                    </div>
                </div>
            </div>-->

            <div class="row">
                <div class="form-group" id="needMark">
                    <label class="col-xs-1 control-label">&nbsp;&nbsp;&nbsp;
                        积分:
                    </label>
                    <div class="col-xs-1">
                        <input class="form-control" name="downloadMark" id="mark" value="0" />
                    </div>
                    <div class="col-xs-2">
                        <a href="/faq">为什么需要积分</a>
                    </div>
                </div>
            </div>
        </form>


        <div class="row">
            <div class="col-xs-10"></div>
            <button class="btn btn-info" id="postExamBtn">发布帖子</button>
        </div>
    </div>
</div>

<th:block th:replace="include/footer:: footer"/>
<th:block th:replace="include/top"/>
<script type="text/javascript" src="/static/webuploader/webuploader.min.js"></script>
<script type="text/javascript" src="/static/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/static/ueditor/ueditor.all.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/ueditor/MyActionUrl.js"></script>
<script type="text/javascript" src="/static/datePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/static/webuploader/webuploader.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/js/bbs.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/js/publicTopic.js"></script>
</body>
</html>